package com.aaa.service.impl;

import com.aaa.dao.EmpDao;
import com.aaa.entity.Emp;
import com.aaa.service.EmpService;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: qy160-demo
 * @description:
 * @author: 闫克起2
 * @create: 2023-03-07 15:00
 **/
@Service
public class EmpServiceImpl  implements EmpService {

    @Autowired
    private EmpDao empDao;


    @Override
    public Result<IPage<Emp>> listByPage(Integer currentPage, Integer pageSize) {
        Page<Emp> page=new Page<>(currentPage,pageSize);
        IPage<Emp> empIPage = empDao.queryTest(page, null);
        return new Result<>(200,"查询成功",empIPage);
    }
}
